<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>jsoneditor编辑器</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="/js/layui/css/layui.css" rel="stylesheet">
    <link rel="stylesheet" href="/css/ku.css">
    <script src="/js/layui/layui.js"></script>
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/jquery/jquery-ui.min.js"></script>
</head>

<body>
    <div class="layui-layout ku-layout-admin">
        <div class="layui-header">
            <div class=" layui-clear">
                <div class="ku-menu-more layui-show-xs-inline-block   layui-hide-sm" lay-header-event="menuLeft">
                    <i class="layui-icon layui-icon-spread-left"></i>
                </div>
                <div class="layui-logo  ">
                    <a class=" layui-font-30 layui-font-white">
                        deloitte
                        <!--<img src="https://digitaltech-dev.deloitte.com.cn/img/logo.iPGv0ASH.png">-->
                    </a>
                </div>

                <ul class="layui-nav ku-menu" id="menu">
                    <!-- 移动端显示 -->
                    <li class="layui-nav-item "><a href="/">首页</a></li>
                    <li class="layui-nav-item ">
                        <a href="javascript:;">数字化审计工具</a>
                        <dl class="layui-nav-child">
                            <dd><a href="javascript:;">数字化审计工具</a></dd>
                            <dd><a href="javascript:;">需求与建议</a></dd>
                            <dd><a href="javascript:;">联系人</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item  "><a href="javascript:;">Audit Pursuit</a></li>
                    <li class="layui-nav-item ">
                        <a href="javascript:;">GenAI</a>
                        <dl class="layui-nav-child">
                            <dd class="layui-this"><a href="javascript:;">用户使用提示</a></dd>
                            <dd><a href="javascript:;">审计应用案例</a></dd>
                            <dd><a href="javascript:;">创新提议</a></dd>
                        </dl>
                    </li>
                </ul>

            </div>
        </div>

        <div class="layui-body">
            <div class="layui-main">

                <blockquote class="layui-elem-quote layui-text">
                    jsoneditor 编辑器
                </blockquote>

                <div class="layui-card">
                    <div class="layui-card-body">
                        <link rel="stylesheet" href="/js/jsoneditor/jsoneditor.css">
                        <script src="/js/jsoneditor/jsoneditor.js"></script>
                        <script type="text/javascript" src="js/clipboard/clipboard.js"></script>

                        <div class="layui-row  layui-col-space15" id="jsoneditor">
                            <div class="layui-col-md6 layui-anim layui-anim-fadein">
                                <div id="jsoneditorl" class="remove-filter remove-repair remove-sort"></div>
                            </div>
                            <div class="layui-col-md6 layui-anim layui-anim-fadein">
                                <div id="jsoneditorr" class="remove-filter remove-repair remove-sort"></div>
                            </div>
                        </div>

                        <div id="resizeJsonEditor" class="">
                            <i class="icon-bars layui-icon layui-icon-shrink-right"></i>
                        </div>

                       
                    </div>
                </div>
                <div class="layui-card">
                    <div class="layui-card-body">

                        <button type="button" class="layui-btn" id="ascendingOrder">代码升序</button>
                        <button type="button" class="layui-btn btn-primary" id="descendingOrder">代码降序</button>
                        <button type="button" class="layui-btn" id="saveToDiskl">下载左侧代码</button>
                        <button type="button" class="layui-btn" id="saveToDiskr">下载右侧代码</button>
                        <button type="button" class="layui-btn" id="copyLJson">复制左侧代码</button>
                        <button type="button" class="layui-btn" id="copyRJson">复制右侧代码</button>
                        <button type="button" class="layui-btn" id="clearResult">清空结果</button>
                        <script src="/js/jsoneditor/jsoneditorapp.js"></script>
                        <script>

                            //const container1 = document.getElementById('jsoneditor1')
                            //const container = document.getElementById('jsoneditor2')

                            //const options = {
                            //    mode: 'tree',
                            //    modes: ['code', 'form', 'text', 'tree', 'view', 'preview'], // allowed modes
                            //    onModeChange: function (newMode, oldMode) {
                            //        console.log('Mode switched from', oldMode, 'to', newMode)
                            //    }
                            //}

                            //const json = {
                            //    "array": [1, 2, 3],
                            //    "boolean": true,
                            //    "null": null,
                            //    "number": 123,
                            //    "object": { "a": "b", "c": "d" },
                            //    "string": "Hello World"
                            //}

                            //const editor = new JSONEditor(container, options, json)

                            //const editor1 = new JSONEditor(container1, options, json)


                        </script>
                    </div>
                </div>
                <div class="layui-card">
                    <div class="layui-card-header">结果</div>
                    <div class="layui-card-body">
                        <pre id="result"></pre>
                    </div>
                </div>
            </div>

            <div class="ku-footer">
                <div class="layui-main">
                    <p class="footer-statement">本站申明：本网站部分工具是站长整合网上已有工具、开源包等，并全部遵循原有协议发布，著作权归属原作者或是团队。</p>
                    <p class="footer-copyright">
                        Copyright © 2011-2021  All rights
                        reserved. &nbsp;&nbsp;&nbsp;&nbsp;<a rel="nofollow" href="https://beian.miit.gov.cn/" style="color: #CCC;" target="_blank">闽ICP备20009294号-1</a>&nbsp;&nbsp;&nbsp;&nbsp;<a rel="nofollow" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=35021102001143" style="color: #CCC;" target="_blank">闽公网安备 35021102001143号</a>
                    </p>
                </div>
            </div>
        </div>

    </div>
    <script>
        //JS
        layui.use(['element', 'layer', 'util'], function () {
            var element = layui.element;
            var layer = layui.layer;
            var util = layui.util;
            var $ = layui.$;

            //头部事件
            util.event('lay-header-event', {
                menuLeft: function (othis) { // 左侧菜单事件
                    //layer.msg('展开左侧菜单的操作', { icon: 0 });
                    var menuHtml = $("#menu").html();
                    layer.open({
                        type: 1,
                        title: false,
                        closeBtn: false,
                        content: '<div class="layui-nav layui-nav-tree" style="width: auto;height: 100%;">' + menuHtml + '</div>',
                        area: ['50%', '100%'],
                        offset: 'lt', // 右上角
                        anim: 'slideRight', // 从右侧抽屉滑出
                        shadeClose: true,
                        scrollbar: true,
                        success: function () {
                            element.render('nav'); //重新对导航进行渲染。注：layui 2.1.6 版本新增
                        }
                    });
                }
            });
        });
    </script>
</body>

</html>